<template>
  <div class="profile">
    <navbar>
      <div slot="center">个人中心</div>
    </navbar>
    <div class="tc"></div>
    <user-detail :user="model" />
    <div
      class="bjxx"
      @click="got('/edit')"
    >
      编辑信息
    </div>
  </div>
</template>
<script>
import Navbar from 'components/common/navbar/Navbar.vue'
import UserDetail from '../../components/common/profile/Profile.vue'

import { Userinfo } from '../../network/user'

import mixins from '../../mixins/index'

export default {
  mixins: [mixins],
  data: () => ({
    model: {}
  }),
  created() {
    // console.log(
    //   localStorage.getItem('token')
    // );
    this.Userinfo()
  },
  methods: {
    async Userinfo() {
      const res = await Userinfo()
      console.log(res);
      this.model = res
    }
  },
  components: {
    Navbar, UserDetail
  }
}
</script>
<style lang='less' scoped>
.profile {
  .tc {
    height: 44px;
  }
  .bjxx {
    background: pink;
    height: 30px;
    margin: 0 10px;
    line-height: 30px;
    border-radius: 0 0px 10px 10px;
  }
}
</style>
